package com.sfh.gd.converter;

import com.sfh.gd.domain.entity.MemberDO;
import com.sfh.gd.domain.vo.MemberVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 会员转换器
 */
@Mapper(componentModel = "spring")
public interface MemberConverter {


    MemberConverter INSTANCE = Mappers.getMapper(MemberConverter.class);


    @Mapping(target = "id", source = "userId")
    MemberVO toVO(MemberDO member);


    List<MemberVO> toVO(List<MemberDO> member);

}
